<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../000-assets/js/vue3.js"></script>
</head>
<body>
    <div id="box">
        {{name}}
        <!-- v-on:可以对于很多事件进行一个绑定，并且可以简写为@，vue中提供的有 -->
        <button @click="changeName">click</button>
    </div>
    <script>
        // 上节课我们说了属性和内容，那么对于绑定事件，vue又有哪些方便的写法呢？
        let app = {
            data(){
                return {
                    name:'小红'
                }
            },
            methods:{
                changeName(){
                    console.log(111111);
                    this.name = '小明';
                }
            }

        }
        let vm = Vue.createApp(app).mount('#box');
    </script>
</body>
</html>